package com.itheima.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/user")
public class UserServletController {

   @RequestMapping("/getParam1")
   public ModelAndView params(ModelAndView modelAndView,  int id, String name){

       modelAndView.addObject("msg","接收到的数据:id："+id+"  name:"+name);

       modelAndView.setViewName("result");
       return modelAndView;
   }
}
